package com.springboot.learn.aspect;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;

/**
 * @author wtcode
 * @Description
 * @date 2025/2/26 - 9:34
 */
@Aspect
public class Aspect4 {

    //@1：目标类型必须是Service3类型的
    @Pointcut("target(com.springboot.learn.service.impl.Service3)")
    public void pc() {
    }

    @Before("pc()")
    public void beforeAdvice(JoinPoint joinpoint) {
        System.out.println(joinpoint);
    }
}
